package classes;
import java.io.File;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.interactions.Actions;


public class MoveMouse {

	 void click()
	 {

	  File file = new File("C:/IE driver/IEDriverServer.exe");
	  System.setProperty("webdriver.ie.driver", file.getAbsolutePath());
	  WebDriver d = new InternetExplorerDriver();
	  d.get("http://www.flipkart.com");
	  WebElement M = d.findElement(By.xpath(".//*[@id='fk-header-tab-book']/div[1]/a/div/div// maa[1]/div"));//Main menu 
	  WebElement SM=d.findElement(By.xpath(".//*[@id='fk-header-tab-book']/div[2]/div[1]/div/div/ul[1]/li[1]/a"));//hidden dynamic element

	  
	  
	  
	  Actions builder = new Actions(d);// To hold mouse on menu
	    builder.moveToElement(M).build().perform();
	    SM.click();
	 }
	 public static void main(String[] args) {
		 MoveMouse l= new MoveMouse();
		 l.click();//Calling the method

	 }

	}